Webcom

object Webcom

Provides some high-level static methods and properties to handle the Webcom SDK for Android.

Types

Link copied to clipboard
enum LogLevel : Enum<Webcom.LogLevel>

Lists all log levels available for the Webcom SDK.

Functions

Link copied to clipboard
fun addLogListener(listener: (Webcom.LogLevel, String, String) -> Unit)

Install a listener that will receive each log emitted by the Webcom SDK.

Link copied to clipboard
fun getMobileCountryCode(): String

Retrieves the Mobile Country Code (MCC) associated to the SIM card activated on the phone.

Link copied to clipboard
fun getMobileNetworkCode(): String

Retrieves the Mobile Network Code (MNC) associated to the SIM card activated on the phone.

Link copied to clipboard
fun onReady(runnable: Runnable)

Registers the runnable callback to be called as soon as the Webcom SDK has completed its initialization.

Link copied to clipboard
fun removeLogListener(listener: (Webcom.LogLevel, String, String) -> Unit): Boolean

Uninstall a previously installed listener, so that it no longer receives the logs emitted by the Webcom SDK.

Link copied to clipboard
fun waitForReady()

Blocks the calling thread until the Webcom SDK has completed its initialization.

Link copied to clipboard
fun whenSdkIsInitialized(block: Runnable)
fun whenSdkIsInitialized(block: () -> Unit)

Runs a given code block once the Webcom SDK is properly initialized.

Properties

Link copied to clipboard
var deviceIdentifier: Subscription.DeviceIdentifier? = null

Represents the device identifier to be used to receive mobile push notifications from Webcom on the current device.

Link copied to clipboard
var logLevel: Webcom.LogLevel

Sets the level of the logs produced by the Webcom SDK.